<div ng-init="init();" class="kmi-layout-content SMT18-content">
    <!-- SMT產品與Panel序號生成列印  -->
    <div class="kmi-header-row">
        <div class="kmi-side-btn left" ng-click="back();">
            <i class="material-icons">&#xE408;</i>
            <div class="kmi-can-click"></div>
        </div>
        <div class="header-title" ng-bind="'SMT18.title' | translate"></div>
        <div class="header-logo"></div>
    </div>
    <div class="kmi-layout-main-content">
        <div class="kmi-layout-page">
            <div class="kmi-text-fields">
                <label class="label" ng-bind="'SMT18.plot_no' | translate"></label>
                <input class="value" ng-model="condition.plot_no" style="flex: 0 0 70%;"></input>
                <div class="tip search" ng-click="loadPlotList();"><img src="image/icons/search.png"></img> </div>
                <div class="warehouse-btn" style="flex: 1;">
                    <button class="mdl-button mdl-js-button kmi-checkbox" ng-click="condition.factory=1" style="flex: 0 0 100px; padding-top: 2px;">
                        <img ng-src="{{condition.factory==1?'image/icons/check1.png':'image/icons/check0.png'}}">
                        {{'SMT18.unfactory' | translate}}
                    </button>
                    <button class="mdl-button mdl-js-button kmi-checkbox" ng-click="condition.factory=0" style="flex: 0 0 100px; padding-top: 2px;">
                        <img ng-src="{{condition.factory==0?'image/icons/check1.png':'image/icons/check0.png'}}">
                        {{'SMT18.infactory' | translate}}
                    </button>
                </div>
                <div class="kmi-button kmi-button-confrim" style="width:100px" ng-click="search()">
                    <label ng-bind="'common.btn.search' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
            <div class="kmi-text-fields">
                <label class="label" ng-bind="'SMT18.serial_no' | translate"></label>
                <div class="serial-no-input" style="flex: 0 0 70%;">
                    <input class="value" ng-model="condition.serial_number_start"></input>
                    <label class="label">~</label>
                    <input class="value" ng-model="condition.serial_number_end"></input>
                </div>
                <div class="serial-no-state" style="flex: 1;">
                    <label ng-bind="'SMT18.generated.state' | translate" ></label>
                    <label ng-bind="'SMT18.generated.s_' + generated | translate"></label>
                </div>
                <div class="kmi-button kmi-button-confrim" style="width:100px" ng-click="serialPreview()" ng-disabled="generated != 1">
                    <label ng-bind="'SMT18.btn.serial_preview' | translate"></label>
                    <div class="kmi-can-click"></div>
                </div>
            </div>
            <div class="kmi-text-fields">
                <label class="label" ng-bind="'SMT18.group_of_panel_serial_no' | translate"></label>
                <input class="value" ng-model="group_of_panel_serial_no" style="flex: 0 0 10%;"></input>
                <!-- 暫時還沒有以下功能 -->
                <!-- <div class="btn-panel" style="flex: 1;">
                    <div class="kmi-button kmi-button-confrim" style="width:100px" ng-click="export();">
                        <label ng-bind="'SMT18.btn.export' | translate"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                    <div class="kmi-button kmi-button-confrim" style="width:100px" ng-click="import();">
                        <label ng-bind="'SMT18.btn.import' | translate"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                    <div class="kmi-button kmi-button-confrim" style="width:120px" ng-click="updateSerialNo()">
                        <label ng-bind="'SMT18.btn.update_all_serial_no' | translate"></label>
                        <div class="kmi-can-click"></div>
                    </div>
                </div> -->
            </div>
            <div class="kmi-list column-selector" style="border-radius: 0 0 6px 6px;">
                <div class="kmi-list__header">
                    <div class="kmi-list__column" style="flex:0 0 40px">
                        <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="selectAll();">
                            <img ng-src="{{isSelectAll?'image/icons/check1.png':'image/icons/check0.png'}}"></img>
                        </button>
                    </div>
                    <!-- 標籤列印次數 -->
                    <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT18.list.number_of_label_print' | translate"></div>
                    <!-- 成品序號 -->
                    <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT18.list.serial_no' | translate"></div>
                    <!-- Panel序號 -->
                    <div class="kmi-list__column" style="flex: 1;" ng-bind="'SMT18.list.panel_serial_no' | translate"></div>
                </div>
                <div class="kmi-list__row-content">
                    <div class="kmi-list__row" ng-repeat="item in pcs_detail track by $index">
                        <div class="kmi-list__column" style="flex:0 0 40px;">
                            <button class="mdl-button mdl-js-button mdl-button--icon" ng-click="itemClick(item, $index);">
                                <img ng-src="{{item.isSelect=='true'?'image/icons/check1.png':'image/icons/check0.png'}}"></img>
                            </button>
                        </div>
                        <!-- 標籤列印次數 -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="item.print_label_num"></div>
                        <!-- 成品序號 -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="item.pcs_no"></div>
                        <!-- Panel序號 -->
                        <div class="kmi-list__column" style="flex: 1;" ng-bind="item.panel_no"></div>
                    </div>
                </div>
            </div>
        </div>
        <div class="kmi-layout-footer">
            <button class="mdl-button mdl-js-button mdl-button--fab mdl-shadow--custom mdl-button--custom1"
            ng-click="confirm();" ng-disabled="!pcs_detail || pcs_detail.length==0">
              <i class="material-icons">done</i>
            </button>
        </div>
    </div>
</div>
